package com.polight.simplelocation.locationserver;

import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

public class DataCenter {
	private Map<String,LocationInfo> locationInfos = new ConcurrentHashMap<String,LocationInfo>();
	
	public void addInfo(LocationInfo info) {
		String key = info.getKey();
		System.out.println("[DataCenter] add " + key );
		locationInfos.put(key, info);
	}
	
	public LocationInfo getInfo(String key) {
		System.out.println("[DataCenter] lookup " + key );
		return locationInfos.get(key);
	}
	
	public void persist() {
		
	}
}
